home *** CD-ROM | disk | FTP | other *** search
- -- script Display handlers
- -- option-clicking on a button brings up a script display window
- -- with the button's script
- -- see also
-
- on showScript whichCast
- puppetSprite 24, true
- puppetSprite 25, true
-
- set the locV of sprite 24 = 232
- set the locV of sprite 25 = 124
-
- set the text of field "script display" = the scriptText of member whichCast
- updatestage
- end
-
- on putAwayScript
- puppetSprite 24, false
- puppetSprite 25, false
-
- updatestage
- end
-
- on dragScript
- -- drag script display window
- global closeFlag
-
- set closeFlag = false
- set mySprite = the clickOn
- set myMember = the member of sprite mySprite
- set myWidth = the width of member myMember
- set myHeight = the height of member myMember
-
- set closeBoxH = 40
- set closeBoxV = 18
-
- set scriptSprite = 25
-
- set internalH = the mouseH - the left of sprite mySprite
- set internalV = the mouseV - the top of sprite mySprite
-
- if internalH > myWidth - closeBoxH and internalV > myHeight - closeBoxV then
- set closeFlag = true
- else
- set oldMouseH = the mouseH
- set oldMouseV = the mouseV
- repeat while the mouseDown
- set deltaH = the mouseH - oldMouseH
- set deltaV = the mouseV - oldMouseV
- set the locH of sprite mySprite = the locH of sprite mySprite + deltaH
- set the locV of sprite mySprite = the locV of sprite mySprite + deltaV
- set the locH of sprite scriptSprite = the locH of sprite scriptSprite + deltaH
- set the locV of sprite scriptSprite = the locV of sprite scriptSprite + deltaV
- set oldMouseH = the mouseH
- set oldMouseV = the mouseV
- updatestage
- end repeat
- end if
- end